package com.kehongborui.portal.web;

import com.kehongborui.portal.model.AssetClassifyModel;
import com.kehongborui.portal.service.AssetClassifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author zhang peng yang ming
 * @CopyRight (C) http://www.csdn.com
 * @brief
 * @email 122162005@qq.com
 * @date 2018-09-26
 */
@RestController
@RequestMapping("/asset")
public class AssetClassifyController {
    @Autowired
    private AssetClassifyService assetClassifyService;

    @PostMapping
    public AssetClassifyModel create(@RequestBody AssetClassifyModel model) {
        return assetClassifyService.save(model);
    }

    @GetMapping
    public List<AssetClassifyModel> findAll() {
        return assetClassifyService.findAll();
    }
}
